package com.spring.gop.proj.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.spring.gop.proj.dao.mapper.NoticeMapper;
import com.spring.gop.proj.interfaces.NoticeDao;
import com.spring.gop.proj.model.Notice;

@Repository
public class NoticeDaoImpl implements NoticeDao {
	
	@Autowired NoticeMapper noticeMapper;

	public List<Notice> selectNotices() {
		return noticeMapper.selectNotices();
	}
	
	public Notice selectNotice(int num) {
		return noticeMapper.selectNotice(num);
	}
	
	public void insertNotice(Notice notice) {
		noticeMapper.insertNotice(notice);
	}
	
	public Notice selectLastNotice() {
		return noticeMapper.selectLastNotice();
	}
}
